package schedule

import (
	"time"

	"gddgame.cc/galaxy/binocle/module/schedule"
	"gddgame.cc/galaxy/utils/orm"
)

var (
	ServerScheduleModel = orm.NewModel("server_schedule", &ServerSchedule{}, nil)
)

type ServerSchedule struct {
	Id      int                   `json:"id" orm:"auto" sql:"INT"`
	Server  string                `json:"server" sql:"VARCHAR"`
	Name    string                `json:"name" sql:"VARCHAR"`
	Command string                `json:"command" sql:"Float"`
	Cron    string                `json:"cron" sql:"VARCHAR"`
	Type    schedule.ScheduleType `json:"type" sql:"TINYINT"`
	Status  bool                  `json:"status" sql:"TINYINT"`
	Fail    string                `json:"fail" sql:"TEXT"`

	CreateTime *time.Time `json:"create_time" orm:"createTime" sql:"DATETIME"`
}
